angular.module('nm', [
    'nm.controller',
    'ngTagsInput',
    'ngRoute'
    ])
.config(['$routeProvider', function ($routeProvider) {
    $routeProvider.when('/monitor/create', 
      {
        templateUrl: 'tpl/monitor-create.tpl.html', 
        controller: 'MonitorCreateCtrl'
      });    
      $routeProvider.when('/monitor/list', 
      {
        templateUrl: 'tpl/monitor-list.tpl.html', 
        controller: 'MonitorListCtrl'
      });    

      //告警相关
      $routeProvider.when('/alarm/list', 
      {
        templateUrl: 'tpl/alarm-list.tpl.html', 
        controller: 'AlarmListCtrl'
      });      
      $routeProvider.when('/alarm/user/create', 
      {
        templateUrl: 'tpl/alarm-user-create.tpl.html', 
        controller: 'AlarmUserCreateCtrl'
      });           

      $routeProvider.when('/logs/list', 
      {
        templateUrl: 'tpl/logs-list.tpl.html', 
        controller: 'LogsListCtrl'
      });                    
              
    $routeProvider.otherwise({redirectTo: '/monitor/list'});
}]);